.service-section {
  min-height: 100vh;
  padding: 6.25rem 45px 20px;
}

.service-nav {
  display: flex;
  justify-content: center;
  margin-bottom: 60px;
  flex-wrap: wrap;
  gap: 25px;
}

.service-container {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
}

.service-btn {
  padding: 10px 25px;
  border-radius: 40px;
  background-color: #e0e0e0;
  color: #000;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 24px;
  width: 370px;
}

.service-btn.active,
.service-btn:hover {
  background: #e64126;
  background: linear-gradient(
    90deg,
    rgba(230, 65, 38, 1) 0%,
    rgba(243, 159, 52, 1) 100%
  );
  color: white;
}

.service-card.active {
  width: 500px;
  z-index: 1;
}

.service-card {
  width: 80px;
  height: 450px;
  position: relative;
  border-radius: 30px;
  transition: width 0.5s ease;
  cursor: pointer;
  min-width: 80px;
  flex-grow: 1;
  position: relative;
}

.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
}

.service-card-text {
  position: absolute;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 1);
  padding: 15px 6px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 20px;
  writing-mode: sideways-lr;
  transform-origin: right bottom;
  transition: all 0.6s ease;
  white-space: nowrap;
  font-size: 24px;
}

.service-card-text.active {
  left: 50%;
  bottom: 0;
  right: auto;
  transform: translateX(-50%);
  transform-origin: bottom center;
  writing-mode: horizontal-tb;
  border-radius: 20px;
  padding: 6px 15px;
}

/* কার্ডের ট্রানজিশন স্মুথ করার জন্য */
.service-card {
  transition:
    width 0.6s cubic-bezier(0.25, 1, 0.5, 1),
    flex-grow 0.6s ease;
  overflow: hidden; /* ছবি যাতে বাইরে না বেরিয়ে যায় */
}

/* টেক্সট অ্যানিমেশন */
.service-card-text {
  transition: all 0.5s ease-in-out;
  pointer-events: none; /* যাতে টেক্সটের ওপর মাউস গেলে হোভার ডিস্টার্ব না হয় */
}

/* হোভার করলে মাউস কার্সার পাল্টাবে */
.service-card:hover {
  filter: brightness(1.1);
}

@media (max-width: 768px) {
  .service-section {
    padding: 50px 25px 15px;
  }

  .service-btn {
    font-size: 18px;
  }

  .service-container {
    flex-direction: column;
    align-items: center;
  }

  .service-card.active {
    width: 100%;
  }

  .service-card {
    width: 100%;
    height: auto;
  }

  .service-card-text {
    position: absolute;
    left: 50%;
    bottom: 15px;
    transform: translateX(-50%);
    writing-mode: horizontal-tb;
    border-radius: 20px;
    padding: 6px 15px;
    text-align: center;
    font-size: 18px;
  }

  .service-card-text.active {
    bottom: 15px;
  }
}

@media (max-width: 430px) {
  .service-card-text {
    width: 90%;
    font-size: 14px;
  }
}
